package com.example.gymmanagement.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName equip
 */
@TableName(value ="equip")
@Data
public class Equip implements Serializable {
    /**
     * 器材id
     */
    @TableId(value = "equip_id",type=IdType.AUTO)
    private Long equipId;

    /**
     * 器材名称
     */
    @TableField(value = "equip_name")
    private String equipName;

    /**
     * 器材租用价格
     */
    @TableField(value = "equip_price")
    private Long equipPrice;

    /**
     * 器材状态
     */
    @TableField(value = "equip_status")
    private String equipStatus;

    /**
     * 器材详情
     */
    @TableField(value = "equip_detail")
    private String equipDetail;

    /**
     * 器材赔偿费用
     */
    @TableField(value = "equip_damages")
    private Integer equipDamages;

    /**
     * 器材创建时间
     */
    @TableField(value = "equip_createtime")
    private LocalDateTime equipCreatetime;

    /**
     * 器材更新时间
     */
    @TableField(value = "equip_updatetime")
    private LocalDateTime equipUpdatetime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Equip other = (Equip) that;
        return (this.getEquipId() == null ? other.getEquipId() == null : this.getEquipId().equals(other.getEquipId()))
            && (this.getEquipName() == null ? other.getEquipName() == null : this.getEquipName().equals(other.getEquipName()))
            && (this.getEquipPrice() == null ? other.getEquipPrice() == null : this.getEquipPrice().equals(other.getEquipPrice()))
            && (this.getEquipStatus() == null ? other.getEquipStatus() == null : this.getEquipStatus().equals(other.getEquipStatus()))
            && (this.getEquipDetail() == null ? other.getEquipDetail() == null : this.getEquipDetail().equals(other.getEquipDetail()))
            && (this.getEquipDamages() == null ? other.getEquipDamages() == null : this.getEquipDamages().equals(other.getEquipDamages()))
            && (this.getEquipCreatetime() == null ? other.getEquipCreatetime() == null : this.getEquipCreatetime().equals(other.getEquipCreatetime()))
            && (this.getEquipUpdatetime() == null ? other.getEquipUpdatetime() == null : this.getEquipUpdatetime().equals(other.getEquipUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEquipId() == null) ? 0 : getEquipId().hashCode());
        result = prime * result + ((getEquipName() == null) ? 0 : getEquipName().hashCode());
        result = prime * result + ((getEquipPrice() == null) ? 0 : getEquipPrice().hashCode());
        result = prime * result + ((getEquipStatus() == null) ? 0 : getEquipStatus().hashCode());
        result = prime * result + ((getEquipDetail() == null) ? 0 : getEquipDetail().hashCode());
        result = prime * result + ((getEquipDamages() == null) ? 0 : getEquipDamages().hashCode());
        result = prime * result + ((getEquipCreatetime() == null) ? 0 : getEquipCreatetime().hashCode());
        result = prime * result + ((getEquipUpdatetime() == null) ? 0 : getEquipUpdatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", equipId=").append(equipId);
        sb.append(", equipName=").append(equipName);
        sb.append(", equipPrice=").append(equipPrice);
        sb.append(", equipStatus=").append(equipStatus);
        sb.append(", equipDetail=").append(equipDetail);
        sb.append(", equipDamages=").append(equipDamages);
        sb.append(", equipCreatetime=").append(equipCreatetime);
        sb.append(", equipUpdatetime=").append(equipUpdatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}